package com.scpii.universal.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.scpii.universal.hibernate.dao.BaseDao;
import com.scpii.universal.hibernate.entity.AppLoadingUpdateTab;
import com.scpii.universal.hibernate.intface.BaseInterface;


public class AppLoadingUpdateTabService implements BaseInterface<AppLoadingUpdateTab> {
	private static final Logger log = LoggerFactory.getLogger(AppLoadingUpdateTabService.class);
	
//	private BaseDao<AppLoadingUpdateTab> appLoadingUpdateDao = SpringBeanFactory.appLoadingUpdateTabDao;
	private BaseDao<AppLoadingUpdateTab> appLoadingUpdateDao;
	
	public AppLoadingUpdateTab get(Integer id) throws Exception {
		return appLoadingUpdateDao.get(id);
	}

	public List<AppLoadingUpdateTab> getAll() throws Exception {
		return appLoadingUpdateDao.getAll();
	}

	public AppLoadingUpdateTab get(String propertyName, Object value) throws Exception {
		return null;
	}

	public List<AppLoadingUpdateTab> getList(String propertyName, Object value)
			throws Exception {
		return null;
	}

	public Long getTotalCount() throws Exception {
		return null;
	}

	public void save(AppLoadingUpdateTab obj) throws Exception {

	}

	public void update(AppLoadingUpdateTab obj) throws Exception {

	}

	public void delete(AppLoadingUpdateTab obj) throws Exception {

	}

	public void delete(Integer id) throws Exception {

	}

	public List<AppLoadingUpdateTab> hqlGetList(String hql, Map<String, Object> argsMap)
			throws Exception {
		return appLoadingUpdateDao.hqlGetList(hql, argsMap);
	}

	public void hqlUpdate(String namedHqlQuery, Map<String, Object> argsMap)
			throws Exception {
		appLoadingUpdateDao.hqlUpdate(namedHqlQuery, argsMap);
	}

	public Long hqlGetNums(String namedHqlQuery, Map<String, Object> argsMap)
			throws Exception {
		return appLoadingUpdateDao.hqlGetNums(namedHqlQuery, argsMap);
	}

	public List<AppLoadingUpdateTab> sqlGetList(String sqls,
			Map<String, Object> argsMap) throws Exception {
		return appLoadingUpdateDao.sqlGetList(sqls, argsMap);
	}

	public void sqlUpdate(String sqls, Map<String, Object> argsMap)
			throws Exception {
		appLoadingUpdateDao.sqlUpdate(sqls, argsMap);
	}

	public Long sqlGetNum(String sqls, Map<String, Object> argsMap)
			throws Exception {
		return appLoadingUpdateDao.sqlGetNum(sqls, argsMap);
	}
	
	/**
	 * 获得需要更新的Loading图片
	 * @param updateAppId
	 * @return
	 * @throws Exception
	 * @author 甘建新
	 * 2012-7-19下午10:38:02
	 */
	public List<AppLoadingUpdateTab> getAppLoadingList(int updateAppId)throws Exception{
		if (updateAppId>0) {
			Map<String, Object> argsMap = new HashMap<String, Object>();
			argsMap.put("updateAppId", updateAppId);
			return this.hqlGetList("GET_UPDATE_LOADING", argsMap);
		}
		return null;
	}

	public void setAppLoadingUpdateDao(
			BaseDao<AppLoadingUpdateTab> appLoadingUpdateDao) {
		this.appLoadingUpdateDao = appLoadingUpdateDao;
	}
}